cmake_minimum_required(VERSION 2.8)
project (game_dev)

# Initiate this to nothing
set(LIBS)

if(WIN32)
    # Define where user libs are found
    link_directories(${CMAKE_SOURCE_DIR}/SDL/lib)
    set(LIBS ${LIBS} "mingw32" "SDLmain" "SDL" "opengl32" "glu32")
    
    # Added as a template for now
	set(INCLUDES ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/SDL/include)
    
    message(STATUS "Detected platform: WIN32") 
else(WIN32)
    set(LIBS ${LIBS} "GL" "GLU" "SDL")
    
    # Added as a template for now
	set(INCLUDES ${CMAKE_SOURCE_DIR} 
	   ${CMAKE_SOURCE_DIR}/SDL/include
	   ${CMAKE_SOURCE_DIR}/SDL/include/SDL 
	   /usr/include)
	
    message(STATUS "Detected platform: Linux")
endif(WIN32)

# Include our header dirs
include_directories(${INCLUDES})

# Define which sources should make up the binary
add_executable(gunslinger 
			   main.cpp
			   Cube.cpp
			   TetrisMatrix)

# Link LIBS with executable
target_link_libraries(gunslinger ${LIBS})
